/*
 * HttpCodes.h
 *
 */

#ifndef HTTPCODES_H_
#define HTTPCODES_H_

#include <string>

/**
 * Clase que administra los posibles códigos de respuesta Http y sus mensajes.
 */
class HttpCodes {
	public:
		virtual ~HttpCodes();
		/**
		 * Devuelve el mensaje standard para el código solicitado.
		 */
		static const std::string getMessage(int code);

		// 2xx codes
		static const int OK = 200;
		static const int CREATED = 201;
		static const int ACCEPTED = 202;
		static const int NO_CONTENT = 204;
		// 3xx codes
		static const int MOVED_PERMANENTLY = 301;
		static const int MOVED_TEMPORARILY = 302;
		static const int NOT_MODIFIED = 304;
		// 4xx codes
		static const int BAD_REQUEST = 400;
		static const int UNAUTHORIZED = 401;
		static const int FORBIDDEN = 403;
		static const int NOT_FOUND = 404;
		// 5xx codes
		static const int INTERNAL_SERVER_ERROR = 500;
		static const int NOT_IMPLEMENTED = 501;
		static const int BAD_GATEWAY = 502;
		static const int SERVICE_UNAVAILABLE = 503;
	private:
		HttpCodes();

		static const std::string MSG200;
		static const std::string MSG201;
		static const std::string MSG202;
		static const std::string MSG204;
		static const std::string MSG301;
		static const std::string MSG302;
		static const std::string MSG304;
		static const std::string MSG400;
		static const std::string MSG401;
		static const std::string MSG403;
		static const std::string MSG404;
		static const std::string MSG500;
		static const std::string MSG501;
		static const std::string MSG502;
		static const std::string MSG503;
		static const std::string MSGBAD;
};

#endif  /* HTTPCODES_H_ */
